<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Editing Compra</title>
            <link rel="stylesheet" type="text/css" href="/globalimage2/faces/jsfcrud.css" /><%@ include file="/WEB-INF/jspf/AjaxScripts.jspf" %><script type="text/javascript" src="/globalimage2/faces/jsfcrud.js"></script>
        </head>
        <body>
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h1>Editing Compra</h1>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="CompraId:"/>
                    <h:outputText value="#{compra.compra.compraId}" title="CompraId" />
                    <h:outputText value="Observacao:"/>
                    <h:inputTextarea rows="4" cols="30" id="observacao" value="#{compra.compra.observacao}" title="Observacao" />
                    <h:outputText value="DataCompra (MM/dd/yyyy):"/>
                    <h:inputText id="dataCompra" value="#{compra.compra.dataCompra}" title="DataCompra" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputText value="EntradaSaidaCollection:"/>
                    <h:selectManyListbox id="entradaSaidaCollection" value="#{compra.compra.jsfcrud_transform[jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method.collectionToArray][jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method.arrayToList].entradaSaidaCollection}" title="EntradaSaidaCollection" size="6" converter="#{entradaSaida.converter}" >
                        <f:selectItems value="#{entradaSaida.entradaSaidaItemsAvailableSelectMany}"/>
                    </h:selectManyListbox>
                    <h:outputText value="FuncionarioId:"/>
                    <h:selectOneMenu id="funcionarioId" value="#{compra.compra.funcionarioId}" title="FuncionarioId" >
                        <f:selectItems value="#{funcionario.funcionarioItemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputText value="VendedorId:"/>
                    <h:selectOneMenu id="vendedorId" value="#{compra.compra.vendedorId}" title="VendedorId" required="true" requiredMessage="The vendedorId field is required." >
                        <f:selectItems value="#{usuario.usuarioItemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputText value="ProdutoCompraCollection:"/>
                    <h:outputText escape="false" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getCollectionAsString'][compra.compra.produtoCompraCollection == null ? jsfcrud_null : compra.compra.produtoCompraCollection].jsfcrud_invoke}" title="ProdutoCompraCollection" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{compra.edit}" value="Save">
                    <f:param name="jsfcrud.currentCompra" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][compra.compra][compra.converter].jsfcrud_invoke}"/>
                </h:commandLink>
                <br />
                <br />
                <h:commandLink action="#{compra.detailSetup}" value="Exibir" immediate="true">
                    <f:param name="jsfcrud.currentCompra" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][compra.compra][compra.converter].jsfcrud_invoke}"/>
                </h:commandLink>
                <br />
                <h:commandLink action="#{compra.listSetup}" value="Exibir todos" immediate="true"/>
                <br />
                <h:commandLink value="Index" action="welcome" immediate="true" />
            </h:form>
        </body>
    </html>
</f:view>
